scrolledwindow: Better size requisition for GTK_SCROLL_NATURAL children
authorDebarshi Ray <debarshir@gnome.org>
Tue, 17 May 2016 14:28:20 +0000 (16:28 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 17 May 2016 19:03:51 +0000 (15:03 -0400)
commit096bea3f0ea8e80fe4c9a2a1a860f32c8a94cc33
tree896488ffa177c2bcef985dcac3e69b728df88e29
parent0d18a429aadced1499cdcb28a6a4d8ffee1d6946
scrolledwindow: Better size requisition for GTK_SCROLL_NATURAL children

GtkScrolledWindow leans towards using the minimum size of its child
widget, unless the scrollbar policy is GTK_POLICY_NEVER. This is
probably fine for most GtkScrollable implementations out there.
Especially when using GTK_SCROLL_MINIMUM, which is the default for all
implementations inside gtk+.

However, this is not good for GTK_SCROLL_NATURAL children. eg.,
VteTerminal's minimum size is 1x1 and natural size is the number of
visible rows and columns requested by the user. We really want to use
the natural size unless the user has resized the window to change that.

https://bugzilla.gnome.org/show_bug.cgi?id=766569
gtk/gtkscrolledwindow.c